#include <stdio.h>

size_t my_strlen(const char *buf);

int main(int argc, char const *argv[])
{
    char buf[128] = "zhangsanaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

    printf("buf 有 %ld\n" , my_strlen(buf));

    return 0;
}

size_t my_strlen(const char *buf)
{
    int i = 0;
    for ( i = 0; buf[i] != '\0'; i++);
    return i;
}